/******************************************************************************
 * Product: Adempiere ERP & CRM Smart Business Solution                       *
 * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved.                *
 * This program is free software, you can redistribute it and/or modify it    *
 * under the terms version 2 of the GNU General Public License as published   *
 * by the Free Software Foundation. This program is distributed in the hope   *
 * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.           *
 * See the GNU General Public License for more details.                       *
 * You should have received a copy of the GNU General Public License along    *
 * with this program, if not, write to the Free Software Foundation, Inc.,    *
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.                     *
 * For the text or an alternative of this public license, you may reach us    *
 * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA        *
 * or via info@compiere.org or http://www.compiere.org/license.html           *
 *****************************************************************************/
/** Generated Model - DO NOT CHANGE */
package org.compiere.model;

import java.math.BigDecimal;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.Properties;
import org.compiere.util.Env;

/** Generated Model for hrm_payment_list
 *  @author Adempiere (generated) 
 *  @version Release 3.7.0LTS - $Id$ */
public class X_hrm_payment_list extends PO implements I_hrm_payment_list, I_Persistent 
{

	/**
	 *
	 */
	private static final long serialVersionUID = 20121204L;

    /** the default Constructor */
    public X_hrm_payment_list(Properties ctx)
    { 
      super (ctx, null, null);
    } 

    /** Standard Constructor */
    public X_hrm_payment_list (Properties ctx, int hrm_payment_list_ID, String trxName)
    {
      super (ctx, hrm_payment_list_ID, trxName);
      /** if (hrm_payment_list_ID == 0)
        {
			setC_BPartner_ID (0);
			sethrm_payment_ID (0);
			sethrm_payment_list_ID (0);
			sethrm_total (Env.ZERO);
			setProcessed (false);
// N
        } */
    }

    /** Load Constructor */
    public X_hrm_payment_list (Properties ctx, ResultSet rs, String trxName)
    {
      super (ctx, rs, trxName);
    }

    /** AccessLevel
      * @return 3 - Client - Org 
      */
    protected int get_AccessLevel()
    {
      return accessLevel.intValue();
    }

    /** Load Meta Data */
    protected POInfo initPO (Properties ctx)
    {
      POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
      return poi;
    }

    public String toString()
    {
      StringBuffer sb = new StringBuffer ("X_hrm_payment_list[")
        .append(get_ID()).append("]");
      return sb.toString();
    }

	public org.compiere.model.I_C_BPartner getC_BPartner() throws RuntimeException
    {
		return (org.compiere.model.I_C_BPartner)MTable.get(getCtx(), org.compiere.model.I_C_BPartner.Table_Name)
			.getPO(getC_BPartner_ID(), get_TrxName());	}

	/** Set Business Partner .
		@param C_BPartner_ID 
		Identifies a Business Partner
	  */
	public void setC_BPartner_ID (int C_BPartner_ID)
	{
		if (C_BPartner_ID < 1) 
			set_Value (COLUMNNAME_C_BPartner_ID, null);
		else 
			set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID));
	}

	/** Get Business Partner .
		@return Identifies a Business Partner
	  */
	public int getC_BPartner_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set Date From.
		@param DateFrom 
		Starting date for a range
	  */
	public void setDateFrom (Timestamp DateFrom)
	{
		set_Value (COLUMNNAME_DateFrom, DateFrom);
	}

	/** Get Date From.
		@return Starting date for a range
	  */
	public Timestamp getDateFrom () 
	{
		return (Timestamp)get_Value(COLUMNNAME_DateFrom);
	}

	public org.eevolution.model.I_HR_Department getHR_Department() throws RuntimeException
    {
		return (org.eevolution.model.I_HR_Department)MTable.get(getCtx(), org.eevolution.model.I_HR_Department.Table_Name)
			.getPO(getHR_Department_ID(), get_TrxName());	}

	/** Set Payroll Department.
		@param HR_Department_ID Payroll Department	  */
	public void setHR_Department_ID (int HR_Department_ID)
	{
		if (HR_Department_ID < 1) 
			set_Value (COLUMNNAME_HR_Department_ID, null);
		else 
			set_Value (COLUMNNAME_HR_Department_ID, Integer.valueOf(HR_Department_ID));
	}

	/** Get Payroll Department.
		@return Payroll Department	  */
	public int getHR_Department_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_HR_Department_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public org.eevolution.model.I_HR_Job getHR_Job() throws RuntimeException
    {
		return (org.eevolution.model.I_HR_Job)MTable.get(getCtx(), org.eevolution.model.I_HR_Job.Table_Name)
			.getPO(getHR_Job_ID(), get_TrxName());	}

	/** Set Payroll Job.
		@param HR_Job_ID Payroll Job	  */
	public void setHR_Job_ID (int HR_Job_ID)
	{
		if (HR_Job_ID < 1) 
			set_Value (COLUMNNAME_HR_Job_ID, null);
		else 
			set_Value (COLUMNNAME_HR_Job_ID, Integer.valueOf(HR_Job_ID));
	}

	/** Get Payroll Job.
		@return Payroll Job	  */
	public int getHR_Job_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_HR_Job_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set amount salary.
		@param hrm_amountsalary amount salary	  */
	public void sethrm_amountsalary (BigDecimal hrm_amountsalary)
	{
		set_Value (COLUMNNAME_hrm_amountsalary, hrm_amountsalary);
	}

	/** Get amount salary.
		@return amount salary	  */
	public BigDecimal gethrm_amountsalary () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_hrm_amountsalary);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/** Set hrm_CNalog.
		@param hrm_CNalog hrm_CNalog	  */
	public void sethrm_CNalog (BigDecimal hrm_CNalog)
	{
		set_Value (COLUMNNAME_hrm_CNalog, hrm_CNalog);
	}

	/** Get hrm_CNalog.
		@return hrm_CNalog	  */
	public BigDecimal gethrm_CNalog () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_hrm_CNalog);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/** Set hrm_COtch.
		@param hrm_COtch hrm_COtch	  */
	public void sethrm_COtch (BigDecimal hrm_COtch)
	{
		set_Value (COLUMNNAME_hrm_COtch, hrm_COtch);
	}

	/** Get hrm_COtch.
		@return hrm_COtch	  */
	public BigDecimal gethrm_COtch () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_hrm_COtch);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/** Set hrm_days.
		@param hrm_days hrm_days	  */
	public void sethrm_days (int hrm_days)
	{
		set_Value (COLUMNNAME_hrm_days, Integer.valueOf(hrm_days));
	}

	/** Get hrm_days.
		@return hrm_days	  */
	public int gethrm_days () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_days);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set hrm_IPN.
		@param hrm_IPN hrm_IPN	  */
	public void sethrm_IPN (BigDecimal hrm_IPN)
	{
		set_Value (COLUMNNAME_hrm_IPN, hrm_IPN);
	}

	/** Get hrm_IPN.
		@return hrm_IPN	  */
	public BigDecimal gethrm_IPN () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_hrm_IPN);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/** Set hrm_OPV.
		@param hrm_OPV hrm_OPV	  */
	public void sethrm_OPV (BigDecimal hrm_OPV)
	{
		set_Value (COLUMNNAME_hrm_OPV, hrm_OPV);
	}

	/** Get hrm_OPV.
		@return hrm_OPV	  */
	public BigDecimal gethrm_OPV () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_hrm_OPV);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	public I_hrm_payment gethrm_payment() throws RuntimeException
    {
		return (I_hrm_payment)MTable.get(getCtx(), I_hrm_payment.Table_Name)
			.getPO(gethrm_payment_ID(), get_TrxName());	}

	/** Set hrm_payment.
		@param hrm_payment_ID hrm_payment	  */
	public void sethrm_payment_ID (int hrm_payment_ID)
	{
		if (hrm_payment_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_hrm_payment_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_hrm_payment_ID, Integer.valueOf(hrm_payment_ID));
	}

	/** Get hrm_payment.
		@return hrm_payment	  */
	public int gethrm_payment_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_payment_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set hrm_payment_list.
		@param hrm_payment_list_ID hrm_payment_list	  */
	public void sethrm_payment_list_ID (int hrm_payment_list_ID)
	{
		if (hrm_payment_list_ID < 1) 
			set_ValueNoCheck (COLUMNNAME_hrm_payment_list_ID, null);
		else 
			set_ValueNoCheck (COLUMNNAME_hrm_payment_list_ID, Integer.valueOf(hrm_payment_list_ID));
	}

	/** Get hrm_payment_list.
		@return hrm_payment_list	  */
	public int gethrm_payment_list_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_payment_list_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	public I_hrm_salaryemployee gethrm_salaryemployee() throws RuntimeException
    {
		return (I_hrm_salaryemployee)MTable.get(getCtx(), I_hrm_salaryemployee.Table_Name)
			.getPO(gethrm_salaryemployee_ID(), get_TrxName());	}

	/** Set amount salary.
		@param hrm_salaryemployee_ID amount salary	  */
	public void sethrm_salaryemployee_ID (int hrm_salaryemployee_ID)
	{
		if (hrm_salaryemployee_ID < 1) 
			set_Value (COLUMNNAME_hrm_salaryemployee_ID, null);
		else 
			set_Value (COLUMNNAME_hrm_salaryemployee_ID, Integer.valueOf(hrm_salaryemployee_ID));
	}

	/** Get amount salary.
		@return amount salary	  */
	public int gethrm_salaryemployee_ID () 
	{
		Integer ii = (Integer)get_Value(COLUMNNAME_hrm_salaryemployee_ID);
		if (ii == null)
			 return 0;
		return ii.intValue();
	}

	/** Set hrm_salarytype.
		@param hrm_salarytype hrm_salarytype	  */
	public void sethrm_salarytype (String hrm_salarytype)
	{
		set_Value (COLUMNNAME_hrm_salarytype, hrm_salarytype);
	}

	/** Get hrm_salarytype.
		@return hrm_salarytype	  */
	public String gethrm_salarytype () 
	{
		return (String)get_Value(COLUMNNAME_hrm_salarytype);
	}

	/** Set total amount.
		@param hrm_total total amount	  */
	public void sethrm_total (BigDecimal hrm_total)
	{
		set_Value (COLUMNNAME_hrm_total, hrm_total);
	}

	/** Get total amount.
		@return total amount	  */
	public BigDecimal gethrm_total () 
	{
		BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_hrm_total);
		if (bd == null)
			 return Env.ZERO;
		return bd;
	}

	/** Set Processed.
		@param Processed 
		The document has been processed
	  */
	public void setProcessed (boolean Processed)
	{
		set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed));
	}

	/** Get Processed.
		@return The document has been processed
	  */
	public boolean isProcessed () 
	{
		Object oo = get_Value(COLUMNNAME_Processed);
		if (oo != null) 
		{
			 if (oo instanceof Boolean) 
				 return ((Boolean)oo).booleanValue(); 
			return "Y".equals(oo);
		}
		return false;
	}
}